#include<cmath>
#include<eigen3/Eigen/Core>
#include<eigen3/Eigen/Dense>
#include<iostream>



int main(){

    Eigen::Vector3d point1(2, 1, 1), point2; //(2, 1)
    Eigen::Matrix3d M;
    constexpr double theta = M_PI_4;    // pi/4
    M << std::cos(theta), -std::sin(theta), 1,
         std::sin(theta), std::cos(theta), 2,
         0, 0, 1;

    point2 = M * point1;

    std::cout << "P(2,1) 逆时针旋转45度，再平移(1,2)后的坐标为: ("
        << point2(0) << ", " << point2(1) << ")" << std::endl;


    return 0;
}